<template>  
  <div>
    <h1>当前的 n 值为: {{sum}}</h1>
    <button @click="sum ++">点我 n + 1</button>
    <h2>当前的坐标为: x: {{point.x}}, y: {{point.y}}</h2>
  </div>
</template>

<script>  
import {ref, onMounted, onBeforeUnmount, reactive} from 'vue'
import usePoint from '../hooks/usePoint'
export default {
  name: 'Demo',  
  setup() {  
    let sum = ref(0) 
    let point = usePoint()
    return {sum,point} 
  }
}
</script>

